{% extends "blog/base.html" %}
{% load blog_tags %}
{% block title %}我的博客_列表{% endblock %}
{% block content %}
<h1>我的博客</h1>
    {% if tag %}
    <h2>Posts tagged with:"{{ tag.name }}"</h2>
    {% endif %}
{% for post in posts %}
<h2>
<a href="{{ post.get_absolute_url }}">
    {{ post.title }}
</a>
</h2>
<p class="tages">关键字标签：
    {% for tag in post.tags.all %}
        <a href="{% url "blog:post_list_by_tag" tag.slug %}">{{ tag.name }}</a>
    {% if not froloop.last %},{% endif %}
        {% endfor %} |
    {{ post.tags.all|join:", " }}
</p>
    <p class="date">
    Published{{ post.publish }} by {{ post.author }}
    </p>
    <small>Markdown解析:</small>
    {{ post.body|markdown|truncatewords:30 }}
    <hr>
    <small>直接输出:</small>
    {{ post.body|truncatewords:30|linebreaks }}
{% endfor %}
    {% include "pagination.html" with page=posts %}
{% endblock %}
